package com.fesine.quartz.chapter7;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.quartz.jobs.FileScanListener;

import java.io.File;
import java.sql.Timestamp;

/**
 * @description: 类描述
 * @author: Fesine
 * @createTime:2016/11/19 22:25
 * @update:修改内容
 * @author: Fesine
 * @updateTime:2016/11/19 22:25
 */
public class SimpleFileScanListener implements FileScanListener {
    static Log logger = LogFactory.getLog(SimpleFileScanListener.class);
    public void fileUpdated(String fileName) {
        File file = new File(fileName);
        Timestamp timestamp = new Timestamp(file.lastModified());
        logger.info(fileName +" was modified at "+ timestamp);
    }
}
